var solrFiledCopyWinAdd;
var solrFiledCopyFormAdd;
function addSolrFiledCopy(){
	initSolrFiledCopyFormAdd();
	solrFiledCopyWinAdd = Ext.create('Ext.Window',{
		layout:'fit',
		width:800,
		height:400,
		maximizable:true,
		minimizable:true,
		animateTarget:document.body,
		plain:true,
		modal:true,
		title:'添加信息',
		listeners:{
			minimize:function(win,opts){
				if(!win.collapse()){
					win.collapse();
				}else{
					win.expand();
				}
			}
		},
		items:solrFiledCopyFormAdd,
		buttons:[{
			text:'保存',
			itemId:'save',
			handler:function(button){
				submitForm(solrFiledCopyFormAdd,'../solrFiledCopyController/addSolrFiledCopy',grid,solrFiledCopyWinAdd,false,true);
			}
		},{
			text:'关闭',
			itemId:'close',
			handler:function(button){
				button.up('window').close();
			}
		}]
	});
	Ext.getCmp('solr_core_id_').setValue($('#solr_core_id').val());
	solrFiledCopyWinAdd.show();
	
}
function initSolrFiledCopyFormAdd(){
	solrFiledCopyFormAdd = Ext.create('Ext.FormPanel',{
		xtype:'form',
		waitMsgTarget:true,
		defaultType:'textfield',
		fieldDefaults:{
			labelWidth:100,
			labelAlign:'right',
			flex:1,
			margin:'2 5 4 5'
		},
		items:[
		{
			fieldLabel:'索引字段源',
			xtype:'textfield',
			name:'solr_filed_copy_source_id',
			xtype:'combo',
			emptyText:'请选择',
			store:solrsourceIndexList,
			mode:'local',
			triggerAction:'all',
			editable:false,
			hiddenName:'solr_filed_copy_source_id',
			valueField:'solr_index_id',
			displayField:'solr_index_name',
			anchor:'100%'
		},
		{
			fieldLabel:'目标字段索引',
			xtype:'textfield',
			name:'solr_filed_copy_dest_id',
			xtype:'combo',
			emptyText:'请选择',
			store:solrdestIndexList,
			mode:'local',
			triggerAction:'all',
			editable:false,
			hiddenName:'solr_filed_copy_dest_id',
			valueField:'solr_index_id',
			displayField:'solr_index_name',
			anchor:'100%'
		},
		{
			fieldLabel:'备注',
			xtype:'textareafield',
			name:'solr_filed_copy_remark',
			maxLength:200,
			anchor:'100%'
		},
		{
			fieldLabel:'实例编号',
			xtype:'textfield',
			hidden:true,
			id:'solr_core_id_',
			name:'solr_core_id',
			maxLength:32,
			anchor:'100%'
		}
		]
	});
}
